package cn.huanba.client;

import cn.huanba.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * (User)表服务接口
 *
 * @author makejava
 * @since 2021-01-07 17:23:28
 */
@FeignClient(name = "huanba-provider")
public interface UserService {
    /**
     * 根据用户名 跟 密码 登录
     *
     * @param loginname
     * @param password
     * @return
     */
    @RequestMapping("user/loginByLoginname")
    User loginByLoginname(@RequestParam("loginname") String loginname,@RequestParam("password") String password);

    /**
     * 根据 手机号 登录
     *
     * @param phone
     * @return
     */
    @RequestMapping("user/loginByPhone")
    User loginByPhone(@RequestParam("phone") String phone);

    @RequestMapping("user/getUserByToken")
    User getUserByToken(@RequestParam("token") String token);

}